package com.jltx.storage.downloader;

import io.reactivex.disposables.Disposable;

/**
 * @author jltxseo
 * Created by junlintianxia on 2019/12/03.
 */
public abstract class FileCallback<T> {

    /**
     * 开始订阅回调
     *
     * @param d
     */
    public void onSubscribe(Disposable d) {
    }

    /**
     * 带Tag成功回调
     *
     * @param result
     */
    public abstract void onSuccess(Object tag, T result);

    /**
     * 失败回调
     *
     * @param result
     */
    public abstract void onFailure(Object tag, T result);

    /**
     * 当前进度回调
     *
     * @param result
     */
    public void onLoading(Object tag, T result) {
    }
}
